package naga.x.net;

import naga.x.common.Updatable;

public interface Session extends Updatable {

	long getId();
	String getRemoteAddress();
	String getLocalAddress();
	<T> T getAttribute(Object key);
	<T> T setAttribute(Object key, T value);
	<T> T removeAttribute(Object key);
	boolean isConnected();
	boolean isClosing();
	void close(boolean immediately);
	<C extends Client> C getClient();
	<C extends Client> void setClient(C client);
	void received(Packet packet);
	void send(Packet packet);
	void dispose();
	
}
